function() {
  var e, t, i, n, r, o, a, s, u, l, c, d, h, f, p, m, _, g, v, y, C, b, T, A, E, S, x, w, P, D, I, R, O, M, L, N, F,
    B, z, k, V, U, G, H, W, q, Y, j, X, Q, Z, K, J, $, ee, te, ie, ne, re, oe, ae, se, ue, le, ce, de, he, fe, pe,
    me, _e, ge, ve, ye, Ce, be = [].slice;
  _e = function() {
      var e, t, i, n, r;
      for (e = {}, r = "Boolean Number String Function Array Date RegExp Undefined Null".split(" "), n = 0, t = r
        .length; n < t; n++) i = r[n], e["[object " + i + "]"] = i.toLowerCase();
      return function(t) {
        var i;
        return i = Object.prototype.toString.call(t), e[i] || "object"
      }
    }(), V = function(e, t, i) {
      return null == t && (t = 0), null == i && (i = 1), e < t && (e = t), e > i && (e = i), e
    }, ge = function(e) {
      return e.length >= 3 ? [].slice.call(e) : e[0]
    }, _ = function(e) {
      var t;
      for (t in e) t < 3 ? (e[t] < 0 && (e[t] = 0), e[t] > 255 && (e[t] = 255)) : 3 === t && (e[t] < 0 && (e[t] =
        0), e[t] > 1 && (e[t] = 1));
      return e
    }, i = Math.PI, de = Math.round, v = Math.cos, A = Math.floor, Q = Math.pow, U = Math.log, fe = Math.sin, pe =
    Math.sqrt, c = Math.atan2, W = Math.max, l = Math.abs, r = 2 * i, n = i / 3, m = function() {
      return arguments[0] instanceof e ? arguments[0] : function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, arguments, function() {})
    }, u = [], "undefined" != typeof module && null !== module && null != module.exports && (module.exports = m),
    "function" == typeof define && define.amd ? define("chroma", [], function() {
      return m
    }) : (ce = "undefined" != typeof exports && null !== exports ? exports : this, ce.chroma = m), m.version =
    "1.0.1", s = {}, o = [], a = !1, e = function() {
      function e() {
        var e, t, i, n, r, u, l, c, d;
        for (u = this, t = [], c = 0, n = arguments.length; c < n; c++) null != (e = arguments[c]) && t.push(e);
        if (l = t[t.length - 1], null != s[l]) u._rgb = _(s[l](ge(t.slice(0, -1))));
        else {
          for (a || (o = o.sort(function(e, t) {
              return t.p - e.p
            }), a = !0), d = 0, r = o.length; d < r && (i = o[d], !(l = i.test.apply(i, t))); d++);
          l && (u._rgb = _(s[l].apply(s, t)))
        }
        null == u._rgb && console.warn("unknown format: " + t), null == u._rgb && (u._rgb = [0, 0, 0]), 3 === u._rgb
          .length && u._rgb.push(1)
      }
      return e.prototype.alpha = function(e) {
        return arguments.length ? (this._rgb[3] = e, this) : this._rgb[3]
      }, e.prototype.toString = function() {
        return this.name()
      }, e
    }(),

    m.brewer = {
      OrRd: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"],
      PuBu: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#045a8d", "#023858"],
      BuPu: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#810f7c", "#4d004b"],
      Oranges: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#a63603", "#7f2704"],
      BuGn: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#006d2c", "#00441b"],
      YlOrBr: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#993404", "#662506"],
      YlGn: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#006837", "#004529"],
      Reds: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#a50f15", "#67000d"],
      RdPu: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177", "#49006a"],
      Greens: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#006d2c", "#00441b"],
      YlGnBu: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#253494", "#081d58"],
      Purples: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#54278f", "#3f007d"],
      GnBu: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#0868ac", "#084081"],
      Greys: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525", "#000000"],
      YlOrRd: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#bd0026", "#800026"],
      PuRd: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#980043", "#67001f"],
      Blues: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#08519c", "#08306b"],
      PuBuGn: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016c59", "#014636"],
      Spectral: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5",
        "#3288bd", "#5e4fa2"
      ],
      RdYlGn: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63",
        "#1a9850", "#006837"
      ],
      RdBu: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3",
        "#2166ac", "#053061"
      ],
      PiYG: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41",
        "#4d9221", "#276419"
      ],
      PRGn: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61",
        "#1b7837", "#00441b"
      ],
      RdYlBu: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1",
        "#4575b4", "#313695"
      ],
      BrBG: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f",
        "#01665e", "#003c30"
      ],
      RdGy: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787",
        "#4d4d4d", "#1a1a1a"
      ],
      PuOr: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac",
        "#542788", "#2d004b"
      ],
      Set2: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"],
      Accent: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17", "#666666"],
      Set1: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"],
      Set3: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9",
        "#bc80bd", "#ccebc5", "#ffed6f"
      ],
      Dark2: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d", "#666666"],
      Paired: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6",
        "#6a3d9a", "#ffff99", "#b15928"
      ],
      Pastel2: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc", "#cccccc"],
      Pastel1: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec", "#f2f2f2"]
    }, ve = {
      indigo: "#4b0082",
      gold: "#ffd700",
      hotpink: "#ff69b4",
      firebrick: "#b22222",
      indianred: "#cd5c5c",
      yellow: "#ffff00",
      mistyrose: "#ffe4e1",
      darkolivegreen: "#556b2f",
      olive: "#808000",
      darkseagreen: "#8fbc8f",
      pink: "#ffc0cb",
      tomato: "#ff6347",
      lightcoral: "#f08080",
      orangered: "#ff4500",
      navajowhite: "#ffdead",
      lime: "#00ff00",
      palegreen: "#98fb98",
      darkslategrey: "#2f4f4f",
      greenyellow: "#adff2f",
      burlywood: "#deb887",
      seashell: "#fff5ee",
      mediumspringgreen: "#00fa9a",
      fuchsia: "#ff00ff",
      papayawhip: "#ffefd5",
      blanchedalmond: "#ffebcd",
      chartreuse: "#7fff00",
      dimgray: "#696969",
      black: "#000000",
      peachpuff: "#ffdab9",
      springgreen: "#00ff7f",
      aquamarine: "#7fffd4",
      white: "#ffffff",
      orange: "#ffa500",
      lightsalmon: "#ffa07a",
      darkslategray: "#2f4f4f",
      brown: "#a52a2a",
      ivory: "#fffff0",
      dodgerblue: "#1e90ff",
      peru: "#cd853f",
      lawngreen: "#7cfc00",
      chocolate: "#d2691e",
      crimson: "#dc143c",
      forestgreen: "#228b22",
      darkgrey: "#a9a9a9",
      lightseagreen: "#20b2aa",
      cyan: "#00ffff",
      mintcream: "#f5fffa",
      silver: "#c0c0c0",
      antiquewhite: "#faebd7",
      mediumorchid: "#ba55d3",
      skyblue: "#87ceeb",
      gray: "#808080",
      darkturquoise: "#00ced1",
      goldenrod: "#daa520",
      darkgreen: "#006400",
      floralwhite: "#fffaf0",
      darkviolet: "#9400d3",
      darkgray: "#a9a9a9",
      moccasin: "#ffe4b5",
      saddlebrown: "#8b4513",
      grey: "#808080",
      darkslateblue: "#483d8b",
      lightskyblue: "#87cefa",
      lightpink: "#ffb6c1",
      mediumvioletred: "#c71585",
      slategrey: "#708090",
      red: "#ff0000",
      deeppink: "#ff1493",
      limegreen: "#32cd32",
      darkmagenta: "#8b008b",
      palegoldenrod: "#eee8aa",
      plum: "#dda0dd",
      turquoise: "#40e0d0",
      lightgrey: "#d3d3d3",
      lightgoldenrodyellow: "#fafad2",
      darkgoldenrod: "#b8860b",
      lavender: "#e6e6fa",
      maroon: "#800000",
      yellowgreen: "#9acd32",
      sandybrown: "#f4a460",
      thistle: "#d8bfd8",
      violet: "#ee82ee",
      navy: "#000080",
      magenta: "#ff00ff",
      dimgrey: "#696969",
      tan: "#d2b48c",
      rosybrown: "#bc8f8f",
      olivedrab: "#6b8e23",
      blue: "#0000ff",
      lightblue: "#add8e6",
      ghostwhite: "#f8f8ff",
      honeydew: "#f0fff0",
      cornflowerblue: "#6495ed",
      slateblue: "#6a5acd",
      linen: "#faf0e6",
      darkblue: "#00008b",
      powderblue: "#b0e0e6",
      seagreen: "#2e8b57",
      darkkhaki: "#bdb76b",
      snow: "#fffafa",
      sienna: "#a0522d",
      mediumblue: "#0000cd",
      royalblue: "#4169e1",
      lightcyan: "#e0ffff",
      green: "#008000",
      mediumpurple: "#9370db",
      midnightblue: "#191970",
      cornsilk: "#fff8dc",
      paleturquoise: "#afeeee",
      bisque: "#ffe4c4",
      slategray: "#708090",
      darkcyan: "#008b8b",
      khaki: "#f0e68c",
      wheat: "#f5deb3",
      teal: "#008080",
      darkorchid: "#9932cc",
      deepskyblue: "#00bfff",
      salmon: "#fa8072",
      darkred: "#8b0000",
      steelblue: "#4682b4",
      palevioletred: "#db7093",
      lightslategray: "#778899",
      aliceblue: "#f0f8ff",
      lightslategrey: "#778899",
      lightgreen: "#90ee90",
      orchid: "#da70d6",
      gainsboro: "#dcdcdc",
      mediumseagreen: "#3cb371",
      lightgray: "#d3d3d3",
      mediumturquoise: "#48d1cc",
      lemonchiffon: "#fffacd",
      cadetblue: "#5f9ea0",
      lightyellow: "#ffffe0",
      lavenderblush: "#fff0f5",
      coral: "#ff7f50",
      purple: "#800080",
      aqua: "#00ffff",
      whitesmoke: "#f5f5f5",
      mediumslateblue: "#7b68ee",
      darkorange: "#ff8c00",
      mediumaquamarine: "#66cdaa",
      darksalmon: "#e9967a",
      beige: "#f5f5dc",
      blueviolet: "#8a2be2",
      azure: "#f0ffff",
      lightsteelblue: "#b0c4de",
      oldlace: "#fdf5e6",
      rebeccapurple: "#663399"
    }, m.colors = ve, N = function() {
      var e, i, n, r, o, a, s, u, l, c, d;
      return a = ge(arguments), r = a[0], e = a[1], i = a[2], void 0 !== r && 3 === r.length && (s = r, r = s[0],
        e = s[1], i = s[2]), void 0 !== r && 3 === r.length && (u = r, r = u[0], e = u[1], i = u[2]), c = (r +
        16) / 116, l = c + e / 500, d = c - i / 200, l = F(l) * t.X, c = F(c) * t.Y, d = F(d) * t.Z, o = Ce(
        3.2404542 * l - 1.5371385 * c - .4985314 * d), n = Ce(-.969266 * l + 1.8760108 * c + .041556 * d), i = Ce(
        .0556434 * l - .2040259 * c + 1.0572252 * d), [V(o, 0, 255), V(n, 0, 255), V(i, 0, 255), 1]
    }, F = function(e) {
      return e > .206893034 ? e * e * e : (e - 4 / 29) / 7.787037
    }, Ce = function(e) {
      return de(255 * (e <= .00304 ? 12.92 * e : 1.055 * Q(e, 1 / 2.4) - .055))
    }, t = {
      K: 18,
      X: .95047,
      Y: 1,
      Z: 1.08883
    }, ie = function() {
      var e, t, i, n, r, o, a, s;
      return n = ge(arguments), i = n[0], t = n[1], e = n[2], r = se(i, t, e), o = r[0], a = r[1], s = r[2], [116 *
        a - 16, 500 * (o - a), 200 * (a - s)
      ]
    }, ue = function(e) {
      return (e /= 255) <= .04045 ? e / 12.92 : Q((e + .055) / 1.055, 2.4)
    }, ye = function(e) {
      return e > .008856 ? Q(e, 1 / 3) : 7.787037 * e + 4 / 29
    }, se = function() {
      var e, i, n, r, o, a, s;
      return r = ge(arguments), n = r[0], i = r[1], e = r[2], n = ue(n), i = ue(i), e = ue(e), o = ye((.4124564 *
          n + .3575761 * i + .1804375 * e) / t.X), a = ye((.2126729 * n + .7151522 * i + .072175 * e) / t.Y), s =
        ye((.0193339 * n + .119192 * i + .9503041 * e) / t.Z), [o, a, s]
    }, m.lab = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["lab"]), function() {})
    }, s.lab = N, e.prototype.lab = function() {
      return ie(this._rgb)
    }, d = function(e) {
      var t, i, n, r, o, a, s, u, l, c, h;
      return e = function() {
        var t, i, n;
        for (n = [], i = 0, t = e.length; i < t; i++) r = e[i], n.push(m(r));
        return n
      }(), 2 === e.length ? (l = function() {
        var t, i, n;
        for (n = [], i = 0, t = e.length; i < t; i++) r = e[i], n.push(r.lab());
        return n
      }(), o = l[0], a = l[1], t = function(e) {
        var t, i;
        return i = function() {
          var i, n;
          for (n = [], t = i = 0; i <= 2; t = ++i) n.push(o[t] + e * (a[t] - o[t]));
          return n
        }(), m.lab.apply(m, i)
      }) : 3 === e.length ? (c = function() {
        var t, i, n;
        for (n = [], i = 0, t = e.length; i < t; i++) r = e[i], n.push(r.lab());
        return n
      }(), o = c[0], a = c[1], s = c[2], t = function(e) {
        var t, i;
        return i = function() {
          var i, n;
          for (n = [], t = i = 0; i <= 2; t = ++i) n.push((1 - e) * (1 - e) * o[t] + 2 * (1 - e) * e * a[t] +
            e * e * s[t]);
          return n
        }(), m.lab.apply(m, i)
      }) : 4 === e.length ? (h = function() {
        var t, i, n;
        for (n = [], i = 0, t = e.length; i < t; i++) r = e[i], n.push(r.lab());
        return n
      }(), o = h[0], a = h[1], s = h[2], u = h[3], t = function(e) {
        var t, i;
        return i = function() {
          var i, n;
          for (n = [], t = i = 0; i <= 2; t = ++i) n.push((1 - e) * (1 - e) * (1 - e) * o[t] + 3 * (1 - e) * (
            1 - e) * e * a[t] + 3 * (1 - e) * e * e * s[t] + e * e * e * u[t]);
          return n
        }(), m.lab.apply(m, i)
      }) : 5 === e.length && (i = d(e.slice(0, 3)), n = d(e.slice(2, 5)), t = function(e) {
        return e < .5 ? i(2 * e) : n(2 * (e - .5))
      }), t
    }, m.bezier = d, m.cubehelix = function(e, t, i, n, o) {
      var a, s;
      return null == e && (e = 300), null == t && (t = -1.5), null == i && (i = 1), null == n && (n = 1), null ==
        o && (o = [0, 1]), s = o[1] - o[0], "array" === _e(i) ? 0 === (a = i[1] - i[0]) && (i = i[1]) : a = 0,
        function(u) {
          var l, c, d, h, f, p, g, y, C;
          return l = r * ((e + 120) / 360 + t * u), g = Q(o[0] + s * u, n), p = 0 !== a ? i[0] + u * a : i, c = p *
            g * (1 - g) / 2, h = v(l), C = fe(l), y = g + c * (-.14861 * h + 1.78277 * C), f = g + c * (-.29227 *
              h - .90649 * C), d = g + c * (1.97294 * h), m(_([255 * y, 255 * f, 255 * d]))
        }
    }, m.random = function() {
      var t, i, n;
      for (i = "0123456789abcdef", t = "#", n = 0; n < 6; ++n) t += i.charAt(A(16 * Math.random()));
      return new e(t)
    }, s.rgb = function() {
      var e, t, i, n;
      t = ge(arguments), i = [];
      for (e in t) n = t[e], i.push(n);
      return i
    }, m.rgb = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["rgb"]), function() {})
    }, e.prototype.rgb = function() {
      return this._rgb.slice(0, 3)
    }, e.prototype.rgba = function() {
      return this._rgb
    }, o.push({
      p: 15,
      test: function(e) {
        var t;
        return t = ge(arguments), "array" === _e(t) && 3 === t.length ? "rgb" : 4 === t.length && "number" ===
          _e(t[3]) && t[3] >= 0 && t[3] <= 1 ? "rgb" : void 0
      }
    }), E = function(e) {
      var t, i, n, r, o, a;
      if (e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)) return 4 !== e.length && 7 !== e.length || (e = e.substr(
        1)), 3 === e.length && (e = e.split(""), e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), a = parseInt(e,
        16), r = a >> 16, n = a >> 8 & 255, i = 255 & a, [r, n, i, 1];
      if (e.match(/^#?([A-Fa-f0-9]{8})$/)) return 9 === e.length && (e = e.substr(1)), a = parseInt(e, 16), r = a >>
        24 & 255, n = a >> 16 & 255, i = a >> 8 & 255, t = de((255 & a) / 255 * 100) / 100, [r, n, i, t];
      if (null != s.css && (o = s.css(e))) return o;
      throw "unknown color: " + e
    }, J = function(e, t) {
      var i, n, r, o, a, s, u;
      return null == t && (t = "rgb"), a = e[0], r = e[1], n = e[2], i = e[3], u = a << 16 | r << 8 | n, s =
        "000000" + u.toString(16), s = s.substr(s.length - 6), o = "0" + de(255 * i).toString(16), o = o.substr(o
          .length - 2), "#" + function() {
          switch (t.toLowerCase()) {
            case "rgba":
              return s + o;
            case "argb":
              return o + s;
            default:
              return s
          }
        }()
    }, s.hex = function(e) {
      return E(e)
    }, m.hex = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["hex"]), function() {})
    }, e.prototype.hex = function(e) {
      return null == e && (e = "rgb"), J(this._rgb, e)
    }, o.push({
      p: 10,
      test: function(e) {
        if (1 === arguments.length && "string" === _e(e)) return "hex"
      }
    }), w = function() {
      var e, t, i, n, r, o, a, s, u, l, c, d, h, f;
      if (u = ge(arguments), n = u[0], c = u[1], o = u[2], 0 === c) s = i = e = 255 * o;
      else {
        for (f = [0, 0, 0], t = [0, 0, 0], h = o < .5 ? o * (1 + c) : o + c - o * c, d = 2 * o - h, n /= 360, f[0] =
          n + 1 / 3, f[1] = n, f[2] = n - 1 / 3, r = a = 0; a <= 2; r = ++a) f[r] < 0 && (f[r] += 1), f[r] > 1 && (
          f[r] -= 1), 6 * f[r] < 1 ? t[r] = d + 6 * (h - d) * f[r] : 2 * f[r] < 1 ? t[r] = h : 3 * f[r] < 2 ? t[
          r] = d + (h - d) * (2 / 3 - f[r]) * 6 : t[r] = d;
        l = [de(255 * t[0]), de(255 * t[1]), de(255 * t[2])], s = l[0], i = l[1], e = l[2]
      }
      return 4 === arguments.length ? [s, i, e, arguments[3]] : [s, i, e]
    }, ee = function(e, t, i) {
      var n, r, o, a, s;
      return void 0 !== e && e.length >= 3 && (a = e, e = a[0], t = a[1], i = a[2]), e /= 255, t /= 255, i /= 255,
        o = Math.min(e, t, i), W = Math.max(e, t, i), r = (W + o) / 2, W === o ? (s = 0, n = Number.NaN) : s = r <
        .5 ? (W - o) / (W + o) : (W - o) / (2 - W - o), e === W ? n = (t - i) / (W - o) : t === W ? n = 2 + (i -
          e) / (W - o) : i === W && (n = 4 + (e - t) / (W - o)), n *= 60, n < 0 && (n += 360), [n, s, r]
    }, m.hsl = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["hsl"]), function() {})
    }, s.hsl = w, e.prototype.hsl = function() {
      return ee(this._rgb)
    }, P = function() {
      var e, t, i, n, r, o, a, s, u, l, c, d, h, f, p, m, _, g;
      if (u = ge(arguments), n = u[0], m = u[1], g = u[2], g *= 255, 0 === m) s = i = e = g;
      else switch (360 === n && (n = 0), n > 360 && (n -= 360), n < 0 && (n += 360), n /= 60, r = A(n), t = n - r,
        o = g * (1 - m), a = g * (1 - m * t), _ = g * (1 - m * (1 - t)), r) {
        case 0:
          l = [g, _, o], s = l[0], i = l[1], e = l[2];
          break;
        case 1:
          c = [a, g, o], s = c[0], i = c[1], e = c[2];
          break;
        case 2:
          d = [o, g, _], s = d[0], i = d[1], e = d[2];
          break;
        case 3:
          h = [o, a, g], s = h[0], i = h[1], e = h[2];
          break;
        case 4:
          f = [_, o, g], s = f[0], i = f[1], e = f[2];
          break;
        case 5:
          p = [g, o, a], s = p[0], i = p[1], e = p[2]
      }
      return s = de(s), i = de(i), e = de(e), [s, i, e]
    }, te = function() {
      var e, t, i, n, r, o, a, s, u;
      return a = ge(arguments), o = a[0], i = a[1], e = a[2], r = Math.min(o, i, e), W = Math.max(o, i, e), t = W -
        r, u = W / 255, 0 === W ? (n = Number.NaN, s = 0) : (s = t / W, o === W && (n = (i - e) / t), i === W && (
          n = 2 + (e - o) / t), e === W && (n = 4 + (o - i) / t), (n *= 60) < 0 && (n += 360)), [n, s, u]
    }, m.hsv = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["hsv"]), function() {})
    }, s.hsv = P, e.prototype.hsv = function() {
      return te(this._rgb)
    }, j = function(e) {
      var t, i, n;
      return "number" === _e(e) && e >= 0 && e <= 16777215 ? (n = e >> 16, i = e >> 8 & 255, t = 255 & e, [n, i, t,
        1
      ]) : (console.warn("unknown num color: " + e), [0, 0, 0, 1])
    }, oe = function() {
      var e, t, i, n;
      return n = ge(arguments), i = n[0], t = n[1], e = n[2], (i << 16) + (t << 8) + e
    }, m.num = function(t) {
      return new e(t, "num")
    }, e.prototype.num = function() {
      return oe(this._rgb)
    }, s.num = j, o.push({
      p: 10,
      test: function(e) {
        if (1 === arguments.length && "number" === _e(e) && e >= 0 && e <= 16777215) return "num"
      }
    }), y = function(e) {
      var t, i, n, r, o, a, s, u;
      if (e = e.toLowerCase(), null != m.colors && m.colors[e]) return E(m.colors[e]);
      if (o = e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)) {
        for (s = o.slice(1, 4), r = a = 0; a <= 2; r = ++a) s[r] = +s[r];
        s[3] = 1
      } else if (o = e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))
        for (s = o.slice(1, 5), r = u = 0; u <= 3; r = ++u) s[r] = +s[r];
      else if (o = e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)) {
        for (s = o.slice(1, 4), r = t = 0; t <= 2; r = ++t) s[r] = de(2.55 * s[r]);
        s[3] = 1
      } else if (o = e.match(
          /rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/
        )) {
        for (s = o.slice(1, 5), r = i = 0; i <= 2; r = ++i) s[r] = de(2.55 * s[r]);
        s[3] = +s[3]
      } else(o = e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)) ? (n =
        o.slice(1, 4), n[1] *= .01, n[2] *= .01, s = w(n), s[3] = 1) : (o = e.match(
        /hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/
      )) && (n = o.slice(1, 4), n[1] *= .01, n[2] *= .01, s = w(n), s[3] = +o[4]);
      return s
    }, K = function(e) {
      var t;
      return t = e[3] < 1 ? "rgba" : "rgb", "rgb" === t ? t + "(" + e.slice(0, 3).map(de).join(",") + ")" :
        "rgba" === t ? t + "(" + e.slice(0, 3).map(de).join(",") + "," + e[3] + ")" : void 0
    }, le = function(e) {
      return de(100 * e) / 100
    }, x = function(e, t) {
      var i;
      return i = t < 1 ? "hsla" : "hsl", e[0] = le(e[0] || 0), e[1] = le(100 * e[1]) + "%", e[2] = le(100 * e[2]) +
        "%", "hsla" === i && (e[3] = t), i + "(" + e.join(",") + ")"
    }, s.css = function(e) {
      return y(e)
    }, m.css = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["css"]), function() {})
    }, e.prototype.css = function(e) {
      return null == e && (e = "rgb"), "rgb" === e.slice(0, 3) ? K(this._rgb) : "hsl" === e.slice(0, 3) ? x(this
        .hsl(), this.alpha()) : void 0
    }, s.named = function(e) {
      return E(ve[e])
    }, o.push({
      p: 20,
      test: function(e) {
        if (1 === arguments.length && null != ve[e]) return "named"
      }
    }), e.prototype.name = function(e) {
      var t, i;
      arguments.length && (ve[e] && (this._rgb = E(ve[e])), this._rgb[3] = 1), t = this.hex();
      for (i in ve)
        if (t === ve[i]) return i;
      return t
    }, B = function() {
      var e, t, n, r;
      return r = ge(arguments), n = r[0], e = r[1], t = r[2], t = t * i / 180, [n, v(t) * e, fe(t) * e]
    }, z = function() {
      var e, t, i, n, r, o, a, s, u, l, c;
      return u = ge(arguments), a = u[0], n = u[1], o = u[2], l = B(a, n, o), e = l[0], t = l[1], i = l[2], c = N(e,
        t, i), s = c[0], r = c[1], i = c[2], [V(s, 0, 255), V(r, 0, 255), V(i, 0, 255)]
    }, L = function() {
      var e, t, n, r, o, a;
      return a = ge(arguments), o = a[0], e = a[1], t = a[2], n = pe(e * e + t * t), r = (c(t, e) / i * 180 + 360) %
        360, [o, n, r]
    }, ne = function() {
      var e, t, i, n, r, o, a;
      return o = ge(arguments), r = o[0], i = o[1], t = o[2], a = ie(r, i, t), n = a[0], e = a[1], t = a[2], L(n, e,
        t)
    }, m.lch = function() {
      var t;
      return t = ge(arguments), new e(t, "lch")
    }, m.hcl = function() {
      var t;
      return t = ge(arguments), new e(t, "hcl")
    }, s.lch = z, s.hcl = function() {
      var e, t, i, n;
      return n = ge(arguments), t = n[0], e = n[1], i = n[2], z([i, e, t])
    }, e.prototype.lch = function() {
      return ne(this._rgb)
    }, e.prototype.hcl = function() {
      return ne(this._rgb).reverse()
    }, Z = function(e) {
      var t, i, n, r, o, a, s, u, l;
      return null == e && (e = "rgb"), u = ge(arguments), s = u[0], r = u[1], t = u[2], s /= 255, r /= 255, t /=
        255, o = 1 - Math.max(s, Math.max(r, t)), n = o < 1 ? 1 / (1 - o) : 0, i = (1 - s - o) * n, a = (1 - r -
          o) * n, l = (1 - t - o) * n, [i, a, l, o]
    }, g = function() {
      var e, t, i, n, r, o, a, s;
      return a = ge(arguments), t = a[0], r = a[1], s = a[2],
        1 === (n = a[3]) ? [0, 0, 0] : (o = t >= 1 ? 0 : de(255 * (1 - t) * (1 - n)), i = r >= 1 ? 0 : de(255 * (1 -
          r) * (1 - n)), e = s >= 1 ? 0 : de(255 * (1 - s) * (1 - n)), [o, i, e])
    }, s.cmyk = function() {
      var e, t, i, n, r;
      return n = ge(arguments), e = n[0], i = n[1], r = n[2], t = n[3], g(e, i, r, t)
    }, m.cmyk = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["cmyk"]), function() {})
    }, e.prototype.cmyk = function() {
      return Z(this._rgb)
    }, s.gl = function() {
      var e, t, i, n, r;
      for (n = function() {
          var e, i;
          e = ge(arguments), i = [];
          for (t in e) r = e[t], i.push(r);
          return i
        }.apply(this, arguments), e = i = 0; i <= 2; e = ++i) n[e] *= 255;
      return n
    }, m.gl = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["gl"]), function() {})
    }, e.prototype.gl = function() {
      var e;
      return e = this._rgb, [e[0] / 255, e[1] / 255, e[2] / 255, e[3]]
    }, re = function(e, t, i) {
      var n;
      return n = ge(arguments), e = n[0], t = n[1], i = n[2], e = G(e), t = G(t), i = G(i), .2126 * e + .7152 * t +
        .0722 * i
    }, G = function(e) {
      return e /= 255, e <= .03928 ? e / 12.92 : Q((e + .055) / 1.055, 2.4)
    }, u = [], D = function(e, t, i, n) {
      var r, o, a, s;
      for (null == i && (i = .5), null == n && (n = "rgb"), "object" !== _e(e) && (e = m(e)), "object" !== _e(t) &&
        (t = m(t)), a = 0, o = u.length; a < o; a++)
        if (r = u[a], n === r[0]) {
          s = r[1](e, t, i, n);
          break
        } if (null == s) throw "color mode " + n + " is not supported";
      return s.alpha(e.alpha() + i * (t.alpha() - e.alpha())), s
    }, m.interpolate = D, e.prototype.interpolate = function(e, t, i) {
      return D(this, e, t, i)
    }, m.mix = D, e.prototype.mix = e.prototype.interpolate, M = function(t, i, n, r) {
      var o, a;
      return o = t._rgb, a = i._rgb, new e(o[0] + n * (a[0] - o[0]), o[1] + n * (a[1] - o[1]), o[2] + n * (a[2] - o[
        2]), r)
    }, u.push(["rgb", M]), e.prototype.luminance = function(e, t) {
      var i, n, r, o;
      return null == t && (t = "rgb"), arguments.length ? (0 === e ? this._rgb = [0, 0, 0, this._rgb[3]] : 1 === e ?
        this._rgb = [255, 255, 255, this._rgb[3]] : (n = 1e-7, r = 20, o = function(i, a) {
          var s, u;
          return u = i.interpolate(a, .5, t), s = u.luminance(), Math.abs(e - s) < n || !r-- ? u : s > e ? o(i,
            u) : o(u, a)
        }, i = re(this._rgb), this._rgb = (i > e ? o(m("black"), this) : o(this, m("white"))).rgba()), this) : re(
        this._rgb)
    }, me = function(e) {
      var t, i, n, r;
      return r = e / 100, r < 66 ? (n = 255, i = -155.25485562709179 - .44596950469579133 * (i = r - 2) +
        104.49216199393888 * U(i), t = r < 20 ? 0 : .8274096064007395 * (t = r - 10) - 254.76935184120902 +
        115.67994401066147 * U(t)) : (n = 351.97690566805693 + .114206453784165 * (n = r - 55) -
        40.25366309332127 * U(n), i = 325.4494125711974 + .07943456536662342 * (i = r - 50) - 28.0852963507957 *
        U(i), t = 255), _([n, i, t])
    }, ae = function() {
      var e, t, i, n, r, o, a, s;
      for (o = ge(arguments), r = o[0], o[1], e = o[2], n = 1e3, i = 4e4, t = .4; i - n > t;) s = .5 * (i + n), a =
        me(s), a[2] / a[0] >= e / r ? i = s : n = s;
      return de(s)
    }, m.temperature = m.kelvin = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["temperature"]), function() {})
    }, s.temperature = s.kelvin = s.K = me, e.prototype.temperature = function() {
      return ae(this._rgb)
    }, e.prototype.kelvin = e.prototype.temperature, m.contrast = function(t, i) {
      var n, r, o, a;
      return "string" !== (o = _e(t)) && "number" !== o || (t = new e(t)), "string" !== (a = _e(i)) && "number" !==
        a || (i = new e(i)), n = t.luminance(), r = i.luminance(), n > r ? (n + .05) / (r + .05) : (r + .05) / (n +
          .05)
    }, e.prototype.darken = function(e) {
      var t, i;
      return null == e && (e = 20), i = this, t = i.lch(), t[0] -= e, m.lch(t).alpha(i.alpha())
    }, e.prototype.darker = e.prototype.darken, e.prototype.brighten = function(e) {
      return null == e && (e = 20), this.darken(-e)
    }, e.prototype.brighter = e.prototype.brighten, e.prototype.saturate = function(e) {
      var t, i;
      return null == e && (e = 20), i = this, t = i.lch(), t[1] += e, t[1] < 0 && (t[1] = 0), m.lch(t).alpha(i
        .alpha())
    }, e.prototype.desaturate = function(e) {
      return null == e && (e = 20), this.saturate(-e)
    }, e.prototype.premultiply = function() {
      var e, t;
      return t = this.rgb(), e = this.alpha(), m(t[0] * e, t[1] * e, t[2] * e, e)
    }, h = function(e, t, i) {
      if (!h[i]) throw "unknown blend mode " + i;
      return h[i](e, t)
    }, f = function(e) {
      return function(t, i) {
        var n, r;
        return n = m(i).rgb(), r = m(t).rgb(), m(e(n, r), "rgb")
      }
    }, T = function(e) {
      return function(t, i) {
        var n, r, o;
        for (o = [], n = r = 0; r <= 3; n = ++r) o[n] = e(t[n], i[n]);
        return o
      }
    }, Y = function(e, t) {
      return e
    }, q = function(e, t) {
      return e * t / 255
    }, C = function(e, t) {
      return e > t ? t : e
    }, k = function(e, t) {
      return e > t ? e : t
    }, he = function(e, t) {
      return 255 * (1 - (1 - e / 255) * (1 - t / 255))
    }, X = function(e, t) {
      return t < 128 ? 2 * e * t / 255 : 255 * (1 - 2 * (1 - e / 255) * (1 - t / 255))
    }, p = function(e, t) {
      return 255 * (1 - (1 - t / 255) / (e / 255))
    }, b = function(e, t) {
      return 255 === e ? 255 : (e = t / 255 * 255 / (1 - e / 255), e > 255 ? 255 : e)
    }, h.normal = f(T(Y)), h.multiply = f(T(q)), h.screen = f(T(he)), h.overlay = f(T(X)), h.darken = f(T(C)), h
    .lighten = f(T(k)), h.dodge = f(T(b)), h.burn = f(T(p)), m.blend = h, m.scale = function(e, t) {
      var i, n, r, o, a, s, u, l, c, d, h, f, p, _, g, v, y, C, b;
      return u = "rgb", l = m("#ccc"), f = 0, !1, o = [0, 1], n = [], d = !1, h = [], s = 0, a = 1, r = !1, c = 0,
        i = {}, y = function(e, t) {
          var i, r, o, a, s, u, l;
          if (null == e && (e = ["#ddd", "#222"]), null != e && "string" === _e(e) && null != (null != (a = m
              .brewer) ? a[e] : void 0) && (e = m.brewer[e]), "array" === _e(e)) {
            for (e = e.slice(0), i = o = 0, s = e.length - 1; 0 <= s ? o <= s : o >= s; i = 0 <= s ? ++o : --o) r =
              e[i], "string" === _e(r) && (e[i] = m(r));
            if (null != t) h = t;
            else
              for (h = [], i = l = 0, u = e.length - 1; 0 <= u ? l <= u : l >= u; i = 0 <= u ? ++l : --l) h.push(i /
                (e.length - 1))
          }
          return v(), n = e
        }, C = function(e) {
          return null == e && (e = []), o = e, s = e[0], a = e[e.length - 1], v(), c = 2 === e.length ? 0 : e
            .length - 1
        }, _ = function(e) {
          var t, i;
          if (null != o) {
            for (i = o.length - 1, t = 0; t < i && e >= o[t];) t++;
            return t - 1
          }
          return 0
        }, b = function(e) {
          return e
        },
        function(e) {
          var t, i, n, r, u;
          return u = e, o.length > 2 && (r = o.length - 1, t = _(e), n = o[0] + (o[1] - o[0]) * (0 + .5 * f), i = o[
            r - 1] + (o[r] - o[r - 1]) * (1 - .5 * f), u = s + (o[t] + .5 * (o[t + 1] - o[t]) - n) / (i - n) * (
            a - s)), u
        }, g = function(e, t) {
          var r, d, f, p, g, v, y, C;
          if (null == t && (t = !1), isNaN(e)) return l;
          if (t ? C = e : o.length > 2 ? (r = _(e), C = r / (c - 1)) : (C = s !== a ? (e - s) / (a - s) : 0, C = (
              e - s) / (a - s), C = Math.min(1, Math.max(0, C))), t || (C = b(C)), p = Math.floor(1e4 * C), i[p])
            d = i[p];
          else {
            if ("array" === _e(n))
              for (f = g = 0, y = h.length - 1; 0 <= y ? g <= y : g >= y; f = 0 <= y ? ++g : --g) {
                if (v = h[f], C <= v) {
                  d = n[f];
                  break
                }
                if (C >= v && f === h.length - 1) {
                  d = n[f];
                  break
                }
                if (C > v && C < h[f + 1]) {
                  C = (C - v) / (h[f + 1] - v), d = m.interpolate(n[f], n[f + 1], C, u);
                  break
                }
              } else "function" === _e(n) && (d = n(C));
            i[p] = d
          }
          return d
        }, v = function() {
          return i = {}
        }, y(e, t), p = function(e) {
          var t;
          return t = g(e), d && t[d] ? t[d]() : t
        }, p.domain = function(e, t, i, n) {
          var r;
          return null == i && (i = "e"), arguments.length ? (null != t && (r = m.analyze(e, n), e = 0 === t ? [r
            .min, r.max
          ] : m.limits(r, i, t)), C(e), p) : o
        }, p.mode = function(e) {
          return arguments.length ? (u = e, v(), p) : u
        }, p.range = function(e, t) {
          return y(e, t), p
        }, p.out = function(e) {
          return d = e, p
        }, p.spread = function(e) {
          return arguments.length ? (f = e, p) : f
        }, p.correctLightness = function(e) {
          return arguments.length ? (r = e, v(), b = r ? function(e) {
            var t, i, n, r, o, a, s, u, l;
            for (t = g(0, !0).lab()[0], i = g(1, !0).lab()[0], s = t > i, n = g(e, !0).lab()[0], o = t + (i -
                t) * e, r = n - o, u = 0, l = 1, a = 20; Math.abs(r) > .01 && a-- > 0;) ! function() {
              s && (r *= -1), r < 0 ? (u = e, e += .5 * (l - e)) : (l = e, e += .5 * (u - e)), n = g(e, !0)
                .lab()[0], r = n - o
            }();
            return e
          } : function(e) {
            return e
          }, p) : r
        }, p.colors = function() {
          var t, i, n, r, a, s, u, l, c;
          if (r = 0, a = "hex", 1 === arguments.length && ("string" === _e(arguments[0]) ? a = arguments[0] : r =
              arguments[0]), 2 === arguments.length && (r = arguments[0], a = arguments[1]), r) return function() {
            u = [];
            for (var e = 0; 0 <= r ? e < r : e > r; 0 <= r ? e++ : e--) u.push(e);
            return u
          }.apply(this).map(function(e) {
            return p(e / (r - 1))[a]()
          });
          if (e = [], l = [], o.length > 2)
            for (i = c = 1, s = o.length; 1 <= s ? c < s : c > s; i = 1 <= s ? ++c : --c) l.push(.5 * (o[i - 1] + o[
              i]));
          else l = o;
          for (t = 0, n = l.length; t < n; t++) i = l[t], e.push(p(i)[a]());
          return e
        }, p
    },

    null == m.scales && (m.scales = {}), m.scales.cool = function() {
      return m.scale([m.hsl(180, 1, .9), m.hsl(250, .7, .4)])
    },

    m.scales.hot = function() {
      return m.scale(["#000", "#f00", "#ff0", "#fff"], [0, .25, .75, 1]).mode("rgb")
    },

    m.analyze = function(e, t, i) {
      var n, r, o, a, s, u, l;
      if (s = {
          min: Number.MAX_VALUE,
          max: -1 * Number.MAX_VALUE,
          sum: 0,
          values: [],
          count: 0
        }, null == i && (i = function() {
          return !0
        }), n = function(e) {
          null == e || isNaN(e) || (s.values.push(e), s.sum += e, e < s.min && (s.min = e), e > s.max && (s.max =
            e), s.count += 1)
        }, l = function(e, r) {
          if (i(e, r)) return n(null != t && "function" === _e(t) ? t(e) : null != t && "string" === _e(t) ||
            "number" === _e(t) ? e[t] : e)
        }, "array" === _e(e))
        for (a = 0, o = e.length; a < o; a++) u = e[a], l(u);
      else
        for (r in e) u = e[r], l(u, r);
      return s.domain = [s.min, s.max], s.limits = function(e, t) {
        return m.limits(s, e, t)
      }, s
    }, m.limits = function(e, t, i) {
      var n, r, o, a, s, u, c, d, h, f, p, _, g, v, y, C, b, T, E, S, x, w, P, D, I, R, O, M, L, N, F, B, z, k, V,
        G, H, q, Y, j, X, Z, K, J, $, ee, te, ie, ne, re, oe, ae, se, ue;
      if (null == t && (t = "equal"), null == i && (i = 7), "array" === _e(e) && (e = m.analyze(e)), I = e.min, W =
        e.max, e.sum, se = e.values.sort(function(e, t) {
          return e - t
        }), P = [], "c" === t.substr(0, 1) && (P.push(I), P.push(W)), "e" === t.substr(0, 1)) {
        for (P.push(I), S = F = 1, V = i - 1; 1 <= V ? F <= V : F >= V; S = 1 <= V ? ++F : --F) P.push(I + S / i * (
          W - I));
        P.push(W)
      } else if ("l" === t.substr(0, 1)) {
        if (I <= 0) throw "Logarithmic scales are only possible for values > 0";
        for (R = Math.LOG10E * U(I), D = Math.LOG10E * U(W), P.push(I), S = ue = 1, G = i - 1; 1 <= G ? ue <= G :
          ue >= G; S = 1 <= G ? ++ue : --ue) P.push(Q(10, R + S / i * (D - R)));
        P.push(W)
      } else if ("q" === t.substr(0, 1)) {
        for (P.push(I), S = n = 1, Z = i - 1; 1 <= Z ? n <= Z : n >= Z; S = 1 <= Z ? ++n : --n) B = se.length * S /
          i, z = A(B), z === B ? P.push(se[z]) : (k = B - z, P.push(se[z] * k + se[z + 1] * (1 - k)));
        P.push(W)
      } else if ("k" === t.substr(0, 1)) {
        for (M = se.length, v = new Array(M), T = new Array(i), re = !0, L = 0, C = null, C = [], C.push(I), S = r =
          1, K = i - 1; 1 <= K ? r <= K : r >= K; S = 1 <= K ? ++r : --r) C.push(I + S / i * (W - I));
        for (C.push(W); re;) {
          for (x = o = 0, J = i - 1; 0 <= J ? o <= J : o >= J; x = 0 <= J ? ++o : --o) T[x] = 0;
          for (S = a = 0, $ = M - 1; 0 <= $ ? a <= $ : a >= $; S = 0 <= $ ? ++a : --a) {
            for (ae = se[S], O = Number.MAX_VALUE, x = s = 0, ee = i - 1; 0 <= ee ? s <= ee : s >= ee; x = 0 <= ee ?
              ++s : --s)(E = l(C[x] - ae)) < O && (O = E, y = x);
            T[y]++, v[S] = y
          }
          for (N = new Array(i), x = u = 0, te = i - 1; 0 <= te ? u <= te : u >= te; x = 0 <= te ? ++u : --u) N[x] =
            null;
          for (S = c = 0, ie = M - 1; 0 <= ie ? c <= ie : c >= ie; S = 0 <= ie ? ++c : --c) b = v[S], null === N[
            b] ? N[b] = se[S] : N[b] += se[S];
          for (x = d = 0, ne = i - 1; 0 <= ne ? d <= ne : d >= ne; x = 0 <= ne ? ++d : --d) N[x] *= 1 / T[x];
          for (re = !1, x = h = 0, H = i - 1; 0 <= H ? h <= H : h >= H; x = 0 <= H ? ++h : --h)
            if (N[x] !== C[S]) {
              re = !0;
              break
            } C = N, L++, L > 200 && (re = !1)
        }
        for (w = {}, x = f = 0, q = i - 1; 0 <= q ? f <= q : f >= q; x = 0 <= q ? ++f : --f) w[x] = [];
        for (S = p = 0, Y = M - 1; 0 <= Y ? p <= Y : p >= Y; S = 0 <= Y ? ++p : --p) b = v[S], w[b].push(se[S]);
        for (oe = [], x = _ = 0, j = i - 1; 0 <= j ? _ <= j : _ >= j; x = 0 <= j ? ++_ : --_) oe.push(w[x][0]), oe
          .push(w[x][w[x].length - 1]);
        for (oe = oe.sort(function(e, t) {
            return e - t
          }), P.push(oe[0]), S = g = 1, X = oe.length - 1; g <= X; S = g += 2) isNaN(oe[S]) || P.push(oe[S])
      }
      return P
    }, S = function(e, t, i) {
      var o, a, s, u;
      return u = ge(arguments), e = u[0], t = u[1], i = u[2], e /= 360, e < 1 / 3 ? (o = (1 - t) / 3, s = (1 + t *
        v(r * e) / v(n - r * e)) / 3, a = 1 - (o + s)) : e < 2 / 3 ? (e -= 1 / 3, s = (1 - t) / 3, a = (1 + t * v(
        r * e) / v(n - r * e)) / 3, o = 1 - (s + a)) : (e -= 2 / 3, a = (1 - t) / 3, o = (1 + t * v(r * e) / v(n -
        r * e)) / 3, s = 1 - (a + o)), s = V(i * s * 3), a = V(i * a * 3), o = V(i * o * 3), [255 * s, 255 * a,
        255 * o
      ]
    }, $ = function() {
      var e, t, i, n, o, a, s, u;
      return s = ge(arguments), a = s[0], t = s[1], e = s[2], r = 2 * Math.PI, a /= 255, t /= 255, e /= 255, o =
        Math.min(a, t, e), n = (a + t + e) / 3, u = 1 - o / n, 0 === u ? i = 0 : (i = (a - t + (a - e)) / 2, i /=
          Math.sqrt((a - t) * (a - t) + (a - e) * (t - e)), i = Math.acos(i), e > t && (i = r - i), i /= r), [360 *
          i, u, n
        ]
    }, m.hsi = function() {
      return function(e, t, i) {
        i.prototype = e.prototype;
        var n = new i,
          r = e.apply(n, t);
        return Object(r) === r ? r : n
      }(e, be.call(arguments).concat(["hsi"]), function() {})
    }, s.hsi = S, e.prototype.hsi = function() {
      return $(this._rgb)
    }, I = function(t, i, n, r) {
      var o, a, s, u, l, c, d, h, f, p, m, _;
      return "hsl" === r ? (m = t.hsl(), _ = i.hsl()) : "hsv" === r ? (m = t.hsv(), _ = i.hsv()) : "hsi" === r ? (
        m = t.hsi(), _ = i.hsi()) : "lch" === r && (m = t.lch(), _ = i.lch()), "h" === r.substr(0, 1) ? (s = m[0],
        f = m[1], c = m[2], u = _[0], p = _[1], d = _[2]) : (c = m[0], f = m[1], s = m[2], d = _[0], p = _[1], u =
        _[2]), isNaN(s) || isNaN(u) ? isNaN(s) ? isNaN(u) ? a = Number.NaN : (a = u, 1 !== c && 0 !== c ||
        "hsv" === r || (h = p)) : (a = s, 1 !== d && 0 !== d || "hsv" === r || (h = f)) : (o = u > s && u - s >
        180 ? u - (s + 360) : u < s && s - u > 180 ? u + 360 - s : u - s, a = s + n * o), null == h && (h = f +
        n * (p - f)), l = c + n * (d - c), "h" === r.substr(0, 1) ? new e(a, h, l, r) : new e(l, h, a, r)
    }, u = u.concat(function() {
      var e, t, i, n;
      for (i = ["hsv", "hsl", "hsi", "lch"], n = [], t = 0, e = i.length; t < e; t++) H = i[t], n.push([H, I]);
      return n
    }()), O = function(e, t, i, n) {
      var r, o;
      return r = e.num(), o = t.num(), m.num(r + (o - r) * i, "num")
    }, u.push(["num", O]), R = function(t, i, n, r) {
      var o, a;
      return o = t.lab(), a = i.lab(), new e(o[0] + n * (a[0] - o[0]), o[1] + n * (a[1] - o[1]), o[2] + n * (a[2] -
        o[2]), r)
    }, u.push(["lab", R])
}
